/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package mundialfp.view.tables;

import javax.swing.JLabel;
import javax.swing.table.DefaultTableCellRenderer;

/**
 * Headers no resizeables-Headers no reordenables-Acepta tipo Imagen-Sin lineas
 * divisorias- Seleccion unica
 *
 * @author pferraz
 */
public final class TableCustom3 extends TableCustom2 {

    public TableCustom3(int numColumns) {
        super(numColumns);
    }

    public void resizeColumns() {
        ((DefaultTableCellRenderer) this.getTableHeader().getDefaultRenderer()).setHorizontalAlignment(JLabel.CENTER);

        DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
        renderer.setHorizontalAlignment(JLabel.CENTER);

        for (int i = 0; i < 4; i++) {

            if (i != 1 && i != 2) {
                this.getColumnModel().getColumn(i).setCellRenderer(renderer);
            }

        }

        this.getColumnModel().getColumn(0).setPreferredWidth(30);
        this.getColumnModel().getColumn(2).setPreferredWidth(244);
        this.getColumnModel().getColumn(3).setPreferredWidth(100);
    }
}
